package com.yilin.tms.core.remote;

import com.yilin.tms.core.application.ReturnData;
import com.yilin.tms.core.components.interceptor.ReqProviderInterceptor;
import com.yilin.tms.core.entity.order.transit.TransitOrderNote;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 远程调用 资料服务
 *
 * @author zhangjinyuan
 * @date 2022/10/31
 */
@FeignClient(name = "data-service-provider", configuration = ReqProviderInterceptor.class)
public interface IDataRemote {
    /**
     * 签订合同
     */
    @PostMapping(value = "/data/contract/signContract")
    ReturnData<Object> signContract(@RequestParam(value = "transitOrderId") String transitOrderId, @RequestParam(value = "accountId") String accountId);

    /**
     * 作废合同
     */
    @PostMapping(value = "/data/contract/cancellationContract")
    ReturnData<Object> cancellationContract(@RequestParam(value = "transitOrderId") String transitOrderId);


    //------------------------------------------------------------------------------------------------------------------

    /**
     * 生成电子回单
     */
    @PostMapping(value = "/data/receiptOrder/saveElcReceiptOrder")
    ReturnData<Object> saveElcReceiptOrder(@RequestBody TransitOrderNote transitOrderNote);
}
